#pragma once
#include "CacheObj.h"
#include "ODBCBase.h"
#include "BaseProtocol.h"
#include "UserObj.h"

class CAccountObj :
	public CCacheObj, public CODBCBase
{
public:
	CAccountObj(void);
	~CAccountObj(void);

	CAccountObj(const CAccountObj &obj)
	{
		memcpy(this, &obj, sizeof(CAccountObj));
	}

	CAccountObj& operator =(const CAccountObj &obj)
	{
		memcpy(this, &obj, sizeof(CAccountObj));
		return *this;
	}

	virtual DWORD GetKey();
	virtual BOOL Serialize(CODBCInterface &odbcInterface);
	virtual BOOL Unserialize(CODBCInterface &odbcInterface);

	BOOL AddUserInfoObj(CUserInfoObj &userObj);
	CUserInfoObj *FindUserInfoObj(DWORD dwUserId);

public:
	

	CUserInfoObj m_arrUserObj[Max_Account_User_Count];
	int m_nUserCount;
};
